<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
//Auth::routes();
//Route::get('/', function () {
//    return view('welcome');
//});
Auth::routes();
Route::get('/deletetop20', '\App\Http\Controllers\HandanController@deletetop20');
if (isMobile()){
    // Route::get('/', '\App\Http\Controllers\Mobile\MIndexController@index'); //首页
    // Route::get('/', '\App\Http\Controllers\BangdanController@orders'); //新的手机版的分析师页面
    Route::get('/', '\App\Http\Controllers\BangdanController@qianLiBang'); // 新的手机版的潜力榜页面
    Route::get('/mlogin', '\App\Http\Controllers\Mobile\MIndexController@mLogin'); //登录
    Route::get('/mregister', '\App\Http\Controllers\Mobile\MIndexController@mRegister'); //注册
    Route::post('/gotoregister', '\App\Http\Controllers\UserController@ConfirmRegister');   //用户注册验证
    Route::post('/checkname', '\App\Http\Controllers\UserController@checkExistUsername');   //验证用户名是否存在
    Route::post('/mchecktel', '\App\Http\Controllers\UserController@checkExistPhone');   //验证手机号是否存在
    Route::post('/sendIdentify', '\App\Http\Controllers\IdentifyController@sendIdentifyCode');   //获取验证码
    Route::post('/checkverifycode', '\App\Http\Controllers\IdentifyController@checkVerifyCode');   //检查验证码是否正确
    Route::post('/gotologin', '\App\Http\Controllers\UserController@ConfirmLogin');   //用户登录验证
    Route::get('/append', '\App\Http\Controllers\Mobile\MIndexController@mAppend'); //添加
    Route::get('/hd', '\App\Http\Controllers\HandanController@hd');//行情
    Route::post('/deltypename', '\App\Http\Controllers\Mobile\MIndexController@delTypename'); //用户删除品种
    Route::post('/addtypename', '\App\Http\Controllers\Mobile\MIndexController@addTypename'); //用户添加品种
    // Route::get('/bdlists', '\App\Http\Controllers\BangdanController@orders'); //分析师榜

    Route::get('/active', '\App\Http\Controllers\ActiveController@index'); //活动页
    Route::get('/gameranking', '\App\Http\Controllers\ActiveController@gameRanking'); //比赛排名
    Route::get('/rankdetail', '\App\Http\Controllers\Mobile\MIndexController@rankDetail'); //排名详情
	Route::get('/agree', '\App\Http\Controllers\Mobile\MIndexController@mAgree'); //协议
    Route::post('/closeOut', '\App\Http\Controllers\HandanController@closeOut');  //平仓 
    Route::post('/fllow', '\App\Http\Controllers\UserController@fllow'); //跟单订阅分析师
    Route::post('/updateorder', '\App\Http\Controllers\HandanController@updateorder'); //修改止盈止损确认接口
    Route::post('/checkordernum', '\App\Http\Controllers\HandanController@getOrderStatus'); //判断当前用户下单量
    Route::get('/forget', '\App\Http\Controllers\UserController@forgetPswd'); //忘记密码
    Route::post('/findpswd', '\App\Http\Controllers\UserController@ConfirmForgetpswd'); //找回密码操作
    //分析师操作
    Route::get('/authenticate', '\App\Http\Controllers\UserhandleController@auth'); //分析师认证
    Route::post('/gotoHandan', '\App\Http\Controllers\HandanController@gotoHandan'); //喊单    
    Route::get('/tournament', '\App\Http\Controllers\Mobile\MIndexController@tournament');  //赛事规则
    Route::get('/callorder', '\App\Http\Controllers\Mobile\MIndexController@callorder');  //EAI喊单协议书
    Route::get('/competition', '\App\Http\Controllers\Mobile\MIndexController@competition');  //奖项设置
    Route::get('/weekrank', '\App\Http\Controllers\Mobile\MIndexController@weekrank');  //周榜页
    Route::post('/ranking', '\App\Http\Controllers\ActiveController@rankingList'); //每周前十名
    Route::get('/fcomment', '\App\Http\Controllers\Mobile\CostomerController@followcomment');  //分析师跟随评论
    Route::get('/fdata', '\App\Http\Controllers\Mobile\CostomerController@mydatacount');  //分析师数据统计
    Route::get('/analystcertify', '\App\Http\Controllers\Mobile\CostomerController@certify');  //分析师认证
    Route::post('/uploadimg', '\App\Http\Controllers\UserhandleController@uploadImages'); //上传图片
    Route::post('/cardauth', '\App\Http\Controllers\UserhandleController@cardAuth'); //分析师身份认证操作
    Route::post('/schoolauth', '\App\Http\Controllers\UserhandleController@schoolAuth'); //分析师学历认证操作
    Route::get('/mastercenter', '\App\Http\Controllers\Mobile\CostomerController@masterCenter');  //交易大师中心
    //客户个人中心
    Route::get('/home', '\App\Http\Controllers\UCenterController@myusercenter'); //用户中心
    Route::get('/kehuhome', '\App\Http\Controllers\UCenterController@kehuCenter'); //客户的用户中心
    Route::get('/analysthome', '\App\Http\Controllers\UCenterController@UserCenter'); //分析师的用户中心
    Route::get('/management', '\App\Http\Controllers\Mobile\CostomerController@followmanagement');  //客户中心跟随管理
    Route::post('/showinfo', '\App\Http\Controllers\ActiveController@showRankingInfo'); //比赛排名点击的详细信息
    Route::get('/myhandan', '\App\Http\Controllers\Mobile\CostomerController@myhandan');  //客户个人中心我的喊单
    Route::get('/kmyhandan', '\App\Http\Controllers\Mobile\CostomerController@kmyhandan');  //分析师个人中心我的喊单
    Route::get('/handanhistory', '\App\Http\Controllers\UCenterController@handanHistory'); //分析师个人中心的喊单列表
    Route::get('/gendanlist', '\App\Http\Controllers\UCenterController@gendanList'); //我的跟单  

    Route::get('/setup', '\App\Http\Controllers\Mobile\CostomerController@setup');  //设置
    Route::post('/loginout', '\App\Http\Controllers\UserController@loginout');   //退出登录
    Route::get('/baseinfo', '\App\Http\Controllers\UserhandleController@baseinfo'); //基本信息
    Route::post('/dobaseinfo', '\App\Http\Controllers\UserhandleController@baseinfohandle'); //基本信息操作
    Route::get('/authenticate', '\App\Http\Controllers\UserhandleController@auth'); //分析师认证
    Route::get('/getpwd', '\App\Http\Controllers\UserController@forgetPswd'); //用户中心
    Route::post('/uppwdbytel', '\App\Http\Controllers\UserController@updatetelpwd'); //账户安全-根据手机号修改密码
    Route::get('/withdrawals', '\App\Http\Controllers\Mobile\CostomerController@withdrawals');  //提现管理
//	Route::get('/merchandiser', '\App\Http\Controllers\Mobile\CostomerController@merchandiser');  //交易大师榜进入跟单者
	Route::get('/followerlist', '\App\Http\Controllers\UCenterController@followerList'); //跟随者列表
	Route::get('/fhandan', '\App\Http\Controllers\Mobile\CostomerController@fhandan');  //交易大师进入分析师个人中心的喊单
    Route::get('/chicang', '\App\Http\Controllers\Mobile\CostomerController@chicang');  //持仓
    Route::get('/echarts', '\App\Http\Controllers\Mobile\CostomerController@echarts');  //喊单页面图表
    Route::get('/news', '\App\Http\Controllers\Mobile\CostomerController@news');  //基本面
    Route::get('/registeroder', '\App\Http\Controllers\Mobile\CostomerController@registeroder');  //注册协议

    Route::get('/showinfo', '\App\Http\Controllers\BangdanController@showInfo'); //比赛排名点击的详细信息
    Route::post('/showdetailinfo', '\App\Http\Controllers\BangdanController@showDetailInfo'); //新的手机版的潜力榜页面的详细信息
    Route::get('/kgendan', '\App\Http\Controllers\Mobile\CostomerController@kgendan');//新手机客户个人中心订阅记录
    Route::get('/jyxingwei', '\App\Http\Controllers\Mobile\CostomerController@jyXingWei');//新手机客户个人中心交易行为
    Route::get('/newhistoryfollow', '\App\Http\Controllers\UCenterController@newHistoryFollow'); //客户的用户中心
    Route::get('/dataFenXi', '\App\Http\Controllers\Mobile\CostomerController@dataFenXi'); //客户的数据分析
}else{
    Route::get('/', '\App\Http\Controllers\IndexController@index'); //首页
Route::get('/news', '\App\Http\Controllers\IndexController@news'); //基本面
Route::post('/dealTrends', '\App\Http\Controllers\IndexController@dealTrends'); //首页的交易动态
Route::get('/hd', '\App\Http\Controllers\HandanController@hd');   //喊单
Route::get('/socket', '\App\Http\Controllers\HandanController@testSocket');   //喊单
Route::get('/register', '\App\Http\Controllers\UserController@userRegister');   //用户注册
Route::post('/gotoregister', '\App\Http\Controllers\UserController@ConfirmRegister');   //用户注册验证
Route::get('/login', '\App\Http\Controllers\UserController@userLogin');   //用户登录
Route::get('/loginout', '\App\Http\Controllers\UserController@loginout');   //退出登录
Route::post('/gotologin', '\App\Http\Controllers\UserController@ConfirmLogin');   //用户登录验证
Route::post('/sendIdentify', '\App\Http\Controllers\IdentifyController@sendIdentifyCode');   //获取验证码
Route::get('/sendall', '\App\Http\Controllers\IdentifyController@sendIdentifyCodeAll');   //批量发送
Route::post('/checkverifycode', '\App\Http\Controllers\IdentifyController@checkVerifyCode');   //检查验证码是否正确
Route::post('/checkname', '\App\Http\Controllers\UserController@checkExistUsername');   //验证用户名是否存在
//Route::post('/checktel', '\App\Http\Controllers\UserController@checkExistPhone');   //验证手机号是否存在

Route::post('/checktel', '\App\Http\Controllers\UserController@checkExistPhone');   //验证手机号是否存在
Route::post('/gotoHandan', '\App\Http\Controllers\HandanController@gotoHandan');   
Route::post('/closeOut', '\App\Http\Controllers\HandanController@closeOut');  //平仓
Route::post('/allclose', '\App\Http\Controllers\HandanController@allclose');  //批量平仓
Route::get('/GetTradeId', '\App\Http\Controllers\HandanController@GetTradeId');
Route::post('/godelorder', '\App\Http\Controllers\HandanController@goDelOrder'); //提交申请删除前20单

Route::get('/bdlists', '\App\Http\Controllers\BangdanController@orders'); //榜单首页
Route::post('/fllow', '\App\Http\Controllers\UserController@fllow'); //跟单订阅分析师
Route::post('/checkordernum', '\App\Http\Controllers\HandanController@getOrderStatus'); //判断当前用户下单量
Route::get('/forgetpswd', '\App\Http\Controllers\UserController@forgetPswd'); //忘记密码
Route::post('/updatepwd', '\App\Http\Controllers\UserController@updatePwd'); //账户安全-修改密码
Route::post('/findpswd', '\App\Http\Controllers\UserController@ConfirmForgetpswd'); //找回密码操作
Route::get('/saosun', '\App\Http\Controllers\HandanController@orderhandle'); //批量扫损

Route::post('/updateorder', '\App\Http\Controllers\HandanController@updateorder'); //批量扫损
Route::get('/home', '\App\Http\Controllers\UCenterController@myusercenter'); //用户中心
Route::get('/analysthome', '\App\Http\Controllers\UCenterController@UserCenter'); //分析师的用户中心
Route::get('/kehuhome', '\App\Http\Controllers\UCenterController@kehuCenter'); //客户的用户中心

Route::get('/myhome', '\App\Http\Controllers\UserController@myCenter'); //用户中心
Route::get('/handanhistory', '\App\Http\Controllers\UCenterController@handanHistory'); //分析师个人中心的喊单列表
Route::get('/getpwd', '\App\Http\Controllers\UserController@forgetPswd'); //用户中心
Route::get('/followerlist', '\App\Http\Controllers\UCenterController@followerList'); //跟随者列表
Route::get('/gendanlist', '\App\Http\Controllers\UCenterController@gendanList'); //我的跟单
Route::get('/newgendanlist', '\App\Http\Controllers\UCenterController@newgendanList'); //新个人中心我的跟单
Route::get('/newdingyue', '\App\Http\Controllers\UCenterController@newDingYue'); //新个人中心订阅者
Route::get('/allgendanlist', '\App\Http\Controllers\UCenterController@allGendanList'); //我的跟单+自主下单
Route::post('/applyAccount', '\App\Http\Controllers\UCenterController@applyAccount'); //申请体验账户
//分析师操作
Route::get('/authenticate', '\App\Http\Controllers\UserhandleController@auth'); //分析师认证
Route::get('/baseinfo', '\App\Http\Controllers\UserhandleController@baseinfo'); //基本信息
Route::post('/dobaseinfo', '\App\Http\Controllers\UserhandleController@baseinfohandle'); //基本信息操作
Route::post('/cardauth', '\App\Http\Controllers\UserhandleController@cardAuth'); //分析师身份认证操作
Route::post('/schoolauth', '\App\Http\Controllers\UserhandleController@schoolAuth'); //分析师学历认证操作
Route::post('/uploadimg', '\App\Http\Controllers\UserhandleController@uploadImages'); //上传图片
Route::post('/dophoto', '\App\Http\Controllers\UserhandleController@photohandle'); //上传图片
Route::get('/cash', '\App\Http\Controllers\UserhandleController@cashHandle'); //提现
Route::post('/dobank', '\App\Http\Controllers\UserhandleController@bankAuth'); //提现
Route::post('/delbank', '\App\Http\Controllers\UserhandleController@delBank'); //删除银行卡
Route::post('/doselectbank', '\App\Http\Controllers\UserhandleController@selectBank'); //设置默认银行卡
Route::post('/weekdraw', '\App\Http\Controllers\UserhandleController@weekDraw'); //领取周赛奖励
Route::post('/handandraw', '\App\Http\Controllers\UserhandleController@handanDraw'); //领取喊单奖励
Route::get('/historyfollow', '\App\Http\Controllers\UCenterController@historyFollow'); //客户的用户中心 历史跟随
Route::get('/newhistoryfollow', '\App\Http\Controllers\UCenterController@newHistoryFollow'); //客户的用户中心 历史跟随-------新版个人中心
Route::get('/active', '\App\Http\Controllers\ActiveController@index'); //客户的用户中心 历史跟随
Route::get('/gameranking', '\App\Http\Controllers\ActiveController@gameRanking'); //比赛排名
Route::post('/ranking', '\App\Http\Controllers\ActiveController@rankingList'); //每周前十名


Route::get('/help', '\App\Http\Controllers\ActiveController@help'); //帮助中心
Route::get('/error', '\App\Http\Controllers\ActiveController@error'); //ie浏览器
Route::post('/showinfo', '\App\Http\Controllers\ActiveController@showRankingInfo'); //比赛排名点击的详细信息

//散点图
Route::get('/sandian', '\App\Http\Controllers\ActiveController@sandian');
//时间散点图
Route::get('/sandiantime', '\App\Http\Controllers\ActiveController@sandianTime');
//总赢
Route::get('/point', '\App\Http\Controllers\ActiveController@allPoint');
// 有周上下分页
Route::get('/ajaxorderweek', '\App\Http\Controllers\UCenterController@ajaxOrderWeek');
//后台
Route::get('/users', 'AIndexController@getAllUser');

//持仓订单
Route::get('/holdorder', 'AIndexController@holdOrderList');
//总赢排行
Route::get('/profitlist', 'AIndexController@profitPointList');
//近一周总赢排行
Route::get('/weekplist', 'AIndexController@weekPointList');
}

// 推进保损
Route::post('/updateinsureloss', 'HandanController@updateInsureLoss');
Route::get('/award', '\App\Http\Controllers\ActiveController@winAward'); //活动页面每周前十名入库


//后台路由组
Route::group(['namespace' => 'Admin', 'prefix' => 'myadmin'], function(){
//    Route::get('/', [
//        'as' => 'index', 'uses' => 'AIndexController@index'
//    ]);
    Route::get('/', 'AIndexController@index'); // 后台首页
    Route::get('/detail', 'AIndexController@indexDetail'); // 后台条件查询中的订单查询详情
    Route::get('/customercx', 'AIndexController@customerCX'); // 后台客户查询
    Route::get('/chicangcx', 'AIndexController@chicangCX'); // 后台持仓查询
    Route::get('/dingdancx', 'AIndexController@dingdanCX'); // 后台持仓查询
});

// 新版分析师榜-->顶部总收益曲线图
Route::get('/allprofit', '\App\Http\Controllers\BangdanController@allProfit');
//新版分析师榜--->潜力榜
Route::get('/qianlibang', '\App\Http\Controllers\BangdanController@qianLiBang');
// 连胜榜
Route::get('/lianshengbang', '\App\Http\Controllers\BangdanController@lianshengBang');
// 段位榜
Route::get('/duanweibang', '\App\Http\Controllers\BangdanController@duanWeiBang');
// 稳定指数
Route::get('/wendingzhishu', '\App\Http\Controllers\BangdanController@wenDingZhiShu');
// 风报比
Route::get('/fengbaobi', '\App\Http\Controllers\BangdanController@fengBaoBi');
// 推荐榜
Route::get('/tuijianbang', '\App\Http\Controllers\BangdanController@tuiJianBang');
// 胜率榜
Route::get('/shenglvbang', '\App\Http\Controllers\BangdanController@shengLvBang');
Route::post('/lianshenginfo', '\App\Http\Controllers\BangdanController@lianShengInfo'); //连胜榜，查看详情
Route::get('/fanxiangbang', '\App\Http\Controllers\BangdanController@fanXiangBang'); // 反向榜

Route::get('/gopay', '\App\Http\Controllers\PayController@toPay'); //支付
Route::get('/notify', '\App\Http\Controllers\PayController@notify'); //订单支付结果异步通知地址，用于接收订单支付结果通知
Route::post('/newshowinfo', '\App\Http\Controllers\BangdanController@showRankingInfo'); //比赛排名点击的详细信息

//支付
Route::get('/pay', '\App\Http\Controllers\PayController@pay'); //支付
Route::get('/paytwo', '\App\Http\Controllers\PayController@paytwo'); //支付第二个界面
Route::post('/addpay', '\App\Http\Controllers\PayController@addPay'); //提交购买产品
Route::any('/paysuccess', '\App\Http\Controllers\PayController@paysuccess'); //支付成功回调地址
Route::post('/checkpayresult', '\App\Http\Controllers\PayController@checkPayResult'); //判断支付状态
Route::any('/notify', '\App\Http\Controllers\PayController@notify'); //支付异步通知地址
Route::post('/payvps', '\App\Http\Controllers\PayController@payVps'); //单独购买vps
Route::any('/notifyvps', '\App\Http\Controllers\PayController@notifyVps'); //vps支付异步通知地址
//
// PIN设置
Route::get('/accountnum', '\App\Http\Controllers\UserController@accountNum');//生产账户 PIN信息
Route::get('/setpin', '\App\Http\Controllers\PinController@pin'); //PIN路由
Route::post('/checkpin', '\App\Http\Controllers\PinController@checkPin'); //检验PIN账号是否存在
Route::post('/activate', '\App\Http\Controllers\PinController@activate'); //激活账号，会员日期开始倒计时

//分析师推荐
Route::post('/addrecommand', '\App\Http\Controllers\RecommandController@addRecommand'); //添加推荐内容
Route::get('/recomm', '\App\Http\Controllers\RecommandController@recommenDetails'); //分析师推荐详情页
Route::get('/recommlist', '\App\Http\Controllers\RecommandController@recommenList'); //分析师列表页
Route::get('/mrecommdetail', '\App\Http\Controllers\RecommandController@mRecommDetail'); //手机分析师推荐详情页
//Route::get('/recommendcenter', '\App\Http\Controllers\RecommandController@recommendCenter'); // 数据分析师中心页
Route::get('/loudan', '\App\Http\Controllers\UserController@louDan');//查询客户漏单信息
Route::get('/vip', '\App\Http\Controllers\UserController@vip');//开通试用VIP

Route::get('/hrecommand', '\App\Http\Controllers\RecommandController@recommendCenter'); //个人中心--历史发布
Route::get('/selectuser', '\App\Http\Controllers\RecommandController@selectUser'); //相关搜索-搜索用户名
Route::post('/upvotes', '\App\Http\Controllers\RecommandController@upvotes'); //点赞
Route::post('/settuijianinfo', '\App\Http\Controllers\RecommandController@setTuijianNickName'); //设置推荐昵称等相关信息
Route::post('/delrecid', '\App\Http\Controllers\RecommandController@delRecommendByID'); //删除推荐信息